# -*- coding:utf-8 -*-

'''
PROJECT_NAME : workflow-engine
file    : fast
author  : 1032162439@qq.com
date    : 2022-10-24 15:13
IDE     : PyCharm
'''
from fast.service.main import site, FastHandler, get_choice_text
from . import models


class HandlerUserInfo(FastHandler):
    list_display = [FastHandler.display_checkbox, 'id', 'name', 'pwd', FastHandler.display_edit,
                    FastHandler.display_delete]

    has_add_btn = True

    per_page_count = 2

    order_list = ['id']

    action_list = [FastHandler.action_multi_delete, ]

    search_list = ['name__contains']


class HandlerRoleInfo(FastHandler):
    list_display = [FastHandler.display_checkbox, 'id', 'role_name', FastHandler.display_edit,
                    FastHandler.display_delete]


site.register(models.User, HandlerUserInfo)

site.register(models.Role, HandlerRoleInfo)
